#grid{
    margin: auto;
}

.blocks{
    width: 30px;
    height: 30px;
    line-height: 30px;
    display: block; /* 让span以block方式显示*/
    text-align: center;
    border: solid 1px #000;
    user-select: none; /*设置不可拖曳选中*/
    cursor: pointer; /*设置鼠标停留样式*/
}

.blocks:hover{
    background: palegreen;
}